package com.example.dbsample.web;

import com.example.dbsample.service.business.SysDictDataService;
//import com.example.dbsample.model.bo.RespCallSession;
import com.example.dbsample.model.http.LujsResponse;
//import com.example.dbsample.util.log.LogEncryptUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/mock")
public class MockTTSController extends BaseRest {
    // TODO 这个类已经迁移到db工程
    @Autowired
    SysDictDataService sysDictDataService;

    //@Autowired
    //LogEncryptUtil logEncryptUtil;
    //
    //@Value("${mock.tts.float:1.1}")
    //private Float mockTtsFloatValue;


    @PostMapping("/tts")
    public LujsResponse<Object> mockTTS(@RequestBody String message) {

        //RespCallSession session = new RespCallSession();
        //session.setSeqNo(100);
        //session.setTelNo("13612344321");

        // TODO 这个类已经迁移到db工程
        //List<SysDictData> sysDictDataList = sysDictDataService.querySysDictDataEntityByQueryWrapper(0);

        // 不加解密
        //System.out.println("成功请求接口/mock/tts, mockTtsFloatValue: " + mockTtsFloatValue + ", session: " + session.toString());
        //// 加密
        //System.out.println("成功请求接口/mock/tts, mockTtsFloatValue: " + mockTtsFloatValue + ", session: " + logEncryptUtil.encProcessSensitive(session));
        //// 不加密
        //System.out.println("成功请求接口/mock/tts, mockTtsFloatValue: " + mockTtsFloatValue + ", session: " + logEncryptUtil.dec("oAQZwNkKpbKuwqVX0n7k6A=="));
        //
        return LujsResponse.ofSuccess();
    }
}